import { createRouter, createWebHistory } from 'vue-router'
import Layout from '../layout/Layout.vue'


const routes = [
    {
        path: '/',
        name: 'Layout',
        component: Layout,
        redirect: 'student',
        children: [
            {
                path: 'student',
                name: 'Student',
                component: () => import("@/views/Student")

            },
            {
                path: 'teacher',
                name: 'Teacher',
                component: () => import("@/views/Teacher")

            },
            {
                path: 'course',
                name: 'Course',
                component: () => import("@/views/Course")

            },
            {
                path: 'courseStudent',
                name: 'CourseStudent',
                component: () => import("@/views/CourseStudent")

            }
        ]
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import("@/views/Login")
    },
]

const router = createRouter({
    base: '/a/',
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
